<!--
 * @Description: 
 * @Autor: 商晓彬
 * @Date: 2021-06-23 12:09:31
 * @LastEditors: 商晓彬
 * @LastEditTime: 2021-10-14 10:05:51
-->
<div bsModal #createOrEditModal="bs-modal" (onShown)="onShown()" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="createOrEditModal" aria-hidden="true" [config]="{backdrop: 'static', keyboard: !saving}">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <form *ngIf="active" #bopForm="ngForm" novalidate (ngSubmit)="save()" autocomplete="off">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span>{{title}}</span>
                    </h4>
                    <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')" [disabled]="saving">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <label for="sonName">子级名称*</label>
                        <input id="sonName" #sonNameInput="ngModel" type="text" name="sonName" class="form-control" [(ngModel)]="form.sonName" required maxlength="256"  />
                        <validation-messages [formCtrl]="sonNameInput"></validation-messages>
                    </div>
                    <div class="form-group">
                        <label>是否启用 *</label>
                        <p-toggleButton style="margin-left: 100px" [(ngModel)]="val" onLabel="启用" offLabel="停用" onIcon="pi pi-check" offIcon="pi pi-times" [style]="{'width':'150px'}" [ngModelOptions]="{standalone: true}"></p-toggleButton>
                    </div>
                    <!-- <div class="form-group">
                        <label>是否设置为默认值 *</label>
                        <p-toggleButton style="margin-left: 100px" [(ngModel)]="form.drawingNo" onLabel="开启" offLabel="关闭" onIcon="pi pi-check" offIcon="pi pi-times" [style]="{'width':'150px'}"></p-toggleButton>
                    </div> -->
                    <div class="form-group">
                        <label for="remark">备注 </label>
                        <input id="remark" #stageSignInput="ngModel" type="text" name="stageSign" class="form-control" [(ngModel)]="form.remark" maxlength="256"  />
                    </div>
                </div>
                <div class="modal-footer">
                    <button [disabled]="saving" type="button" class="btn btn-default" (click)="close()">取消</button>
                    <button type="submit" class="btn btn-primary" [disabled]="!bopForm.form.valid" [buttonBusy]="saving" [busyText]="l('SavingWithThreeDot')"><i class="fa fa-save"></i> <span>保存</span></button>
                </div>
            </form>
        </div>
    </div>
</div>
